_require local "../../../../basis.smi"

_require       "../../../compilerIRs/recordcalc/main/RecordCalc.ppg.smi"
_require       "../../../data/runtimetypes/main/RuntimeTypes.ppg.smi"
_require local "../../../data/runtimetypes/main/TypeLayout2.smi"
_require       "../../../data/types/main/Types.ppg.smi"
_require local "../../../data/types/main/TypesBasics.smi"
_require local "../../../extensions/debug/main/Bug.smi"
_require       "../../../libs/ids/main/LocalID.smi"

structure SingletonTyEnv2 =
struct

  type env (= {})

  datatype 'a value =
      VAR of RecordCalc.varInfo
    | VAL of 'a

  val emptyEnv : env
  val bindTyvar : env * BoundTypeVarID.id * Types.kind -> env
  val bindTyvars : env * Types.btvEnv -> env
  val bindVar : env * RecordCalc.varInfo -> env
  val bindVars : env * RecordCalc.varInfo list -> env

  val btvEnv : env -> Types.btvEnv
  val constTag : env -> Types.ty -> RuntimeTypes.tag option
  val constSize : env -> Types.ty -> RuntimeTypes.size option
  val unalignedSize : env -> Types.ty -> RuntimeTypes.size
  val findTag : env -> Types.ty -> RuntimeTypes.tag value
  val findSize : env -> Types.ty -> RuntimeTypes.size value

end
